﻿{% extends "gma/base.html" %}

<!-- CONTENT
  =====================================================================-->

{% block content %}

<div class="page flex js_show">
<div class="page__hd">
    <h1 class="page__title">
        <i class="fa fa-adjust weui_grid_icon_fa" style="font-size: 32px"> </i> AB测试 - {{ test_name }}
        <p class="page__desc"> {{ test_title }} </p>
        {% for item in test_desp %}
        <p class="page__desc"> {{ item }} </p>
        {% endfor %}
    </h1>
</div>

<div class="page__bd">
    <div class="weui-cells__title"> 基本信息 </div>
    <div class="weui-cells">
        <div class="weui-cell">
            <div class="weui-cell__bd"> <p> 开始日期 </p> </div>
            <div class="weui-cell__ft">{{ begin_time|date:"Y-m-d H:i:s" }}</div>
        </div>

        <div class="weui-cell">
            <div class="weui-cell__bd"> <p> 结束日期 </p> </div>
            <div class="weui-cell__ft">{{ end_time|date:"Y-m-d H:i:s" }}</div>
        </div>

        <div class="weui-cell">
            <div class="weui-cell__bd"> <p> TEAM-A </p> </div>
            <div class="weui-cell__ft"> {{ team_a_desp }} </div>
        </div>

        <div class="weui-cell">
            <div class="weui-cell__bd"> <p> TEAM-B </p> </div>
            <div class="weui-cell__ft"> {{ team_b_desp }} </div>
        </div>
    </div>

    <div class="weui-cells__title"> 测试结果 </div>
    <div class="weui-panel weui-panel_access">
        <div class="weui-panel__bd">

            <div class="weui-flex">
                <div class="weui-flex__item"><div class=""></div></div>
                <div class="weui-flex__item"><div class="placeholder-title">A</div></div>
                <div class="weui-flex__item"><div class="placeholder-title">B</div></div>
            </div>

            {% for option, a, b, prefix, postfix, compare in data %}
            <div class="weui-flex">
                {% if compare %}
                    <div class="weui-flex__item"><div class="placeholder-title"> {{ option }}</div></div>
                    {% if a > b %}
                        <div class="weui-flex__item"><div class="placeholder-green"> {{ prefix }}{{ a }}{{ postfix }} </div></div>
                        <div class="weui-flex__item"><div class="placeholder-red"> {{ prefix }}{{ b }}{{ postfix }} </div></div>
                    {% elif a == b %}
                        <div class="weui-flex__item"><div class="placeholder-yellow"> {{ prefix }}{{ a }}{{ postfix }} </div></div>
                        <div class="weui-flex__item"><div class="placeholder-yellow"> {{ prefix }}{{ b }}{{ postfix }} </div></div>
                    {% else %}
                        <div class="weui-flex__item"><div class="placeholder-red"> {{ prefix }}{{ a }}{{ postfix }} </div></div>
                        <div class="weui-flex__item"><div class="placeholder-green"> {{ prefix }}{{ b }}{{ postfix }} </div></div>
                    {% endif %}
                {% else %}
                    <div class="weui-flex__item"><div class="placeholder-title"> {{ option }} </div></div>
                    <div class="weui-flex__item"><div class="placeholder-gray"> {{ prefix }}{{ a }}{{ postfix }} </div></div>
                    <div class="weui-flex__item"><div class="placeholder-gray"> {{ prefix }}{{ b }}{{ postfix }} </div></div>
                {% endif %}
            </div>
            {% endfor %}
        </div>
    </div>
</div>

<div class="page__ft">
    <a href="{% url 'gma:home' %}">
        <span class="bottom-logo">
           HiBao
       </span>
    </a>
</div>
</div>

{% endblock content %}


<!-- SCRIPT
  =====================================================================-->

{% block extra_js %}
{% endblock extra_js %}